-
Notifications
You must be signed in to change notification settings - Fork 5.3k
waveshare panel driver update #6499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
waveshare
commented
Nov 29, 2024
- add waveshare 13.3 inch panel support
- add 4lane support
arch/arm/boot/dts/overlays/README
Outdated
| 10_1_inch 10.1" 1280x800 | ||
| 11_9_inch 11.9" 320x1480 | ||
| 13.3inch-30fps 13.3″ 1920x1080 2lane | ||
| 13.3inch-60fps 13.3″ 1920x1080 4lane |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace the TABs with spaces, fix the indentation so it all lines up, and get the parameter names right!
| <&touch>, "touchscreen-inverted-y?"; | ||
| 8_8_inch = <&panel>, "compatible=waveshare,8.8inch-panel"; | ||
| 13_3_60fps_inch = <&panel>, "compatible=waveshare,13.3inch-60fps-panel"; | ||
| 13_3_30fps_inch = <&panel>, "compatible=waveshare,13.3inch-30fps-panel"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These names look wrong - 13_3_inch_60fps and 13_3_inch_30fps make more sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I found the problem. I'm working on it.
I think it would be more appropriate to read 13_3_inch_4lane.
|
Wait a minute. It looks like some of the files haven't been updated yet. |
ddbe278 to
3a3cd0c
Compare
|
Changes have been completed. PTAL. |
|
Fix the tabs again, then all the checkpatch errors and warnings (all of them look reasonable) and squash back down to 3 commits - driver, config and DT. |
6by9
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a need for this new touch driver?
There is already https://github.com/torvalds/linux/blob/master/drivers/input/touchscreen/ilitek_ts_i2c.c which claims to be for the Ilitek 23XX, 25XX, and Lego chips. Which chip are you actually using on this display, and is it compatible?
| module_i2c_driver(ilitek_touch_device_driver); | ||
|
|
||
| MODULE_AUTHOR("waveshare"); | ||
| MODULE_DESCRIPTION("WS_xinchDSI_Touch Driver"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really? The copyright headers all list ILI Technology Corporation and Luca Hsu.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check with my coworker that this TP driver came directly to us from our supplier
| MODULE_DEVICE_TABLE(i2c, tpd_device_id); | ||
|
|
||
| const struct of_device_id touch_dt_match_table[] = { | ||
| {.compatible = "tchip,ilitek2" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who is tchip as a manufacturer? It's not defined in https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
I've just noticed that we already have an ilitek251x overlay in the tree using the ili210x driver that lists an I'd hope either ili210x or ilitek_ts_i2c would support your touch controller. |
6by9
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the update - using the mainline drivers is always preferable to adding yet another downstream one.
I've made comment on one coding style issue that checkpatch will complain over. This is the sort of patch that does want to be sent upstream, so we will be quite strict over it. CI has now run checkpatch for this PR, so please fix the errors.
drivers/input/touchscreen/ili210x.c
Outdated
| return error; | ||
| } | ||
| } | ||
| else{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space before the {
| else{ | ||
| timer_setup(&priv->poll_timer, ili210x_poll_timer_callback, 0); | ||
| mod_timer(&priv->poll_timer, jiffies + msecs_to_jiffies(ILI2XXX_POLL_PERIOD)); | ||
| INIT_WORK(&priv->poll_work, ili210x_poll_work); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't cancel the workqueue or delete the timer on remove.
See 818bb6d for doing the same on edt-ft5x06(*).
In this case it probably wants to go into ili210x_stop though as they've avoided adding a remove function.
(*) Looking at it, I think the cancel_work_sync should come first.
Comparing to tc358743 which also has a polling option, that uses slightly different semantics again - there never is one clear option, and it needs careful thought over what triggers what.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for your valuable guidance on maintaining coding standards, especially for patches intended for upstream submission.I will promptly address the issues identified by checkpatch and correct the coding style problem you pointed out. Once the updates are complete, I will submit the revised version for further review.
Signed-off-by: eng33 <[email protected]>
Signed-off-by: eng33 <[email protected]>
4ef1f88 to
c47be70
Compare
|
Thank you for your feedback and guidance, the changes are as above, please feel free to let me know if further improvements are needed or additional testing is recommended. |
Signed-off-by: eng33 <[email protected]>
|
You keep repeating the same mistakes. Download |
Ok, we will pay attention to this problem in the future |
|
Yes, this one is looking OK. |
|
Looks reasonable to me. I'm not sure which order the ili210x_stop devm_action and the remove hook will be called in, and that could cause issues. Testing with |
kernel: Revert "PCI: Warn if no host bridge NUMA node info" See: raspberrypi/linux#6531 kernel: drm/v3d: Enable Performance Counters before clearing them See: raspberrypi/linux#6514 kernel: configs: Enable Intel Wireless (PCI) drivers See: raspberrypi/linux#6526 kernel: media: i2c: ov9282: Correct the exposure offset See: raspberrypi/linux#6522 kernel: waveshare panel driver update See: raspberrypi/linux#6499 kernel: dtoverlays: Add Arducam override for ov9281 See: raspberrypi/linux#6506 kernel: nvme-pci: Disable Host Memory Buffer usage See: raspberrypi/linux#6510 kernel: Allow setting I²C clock frequency via i2c_arm_baudrate dtparam when using pimidi overlay See: raspberrypi/linux#6513
kernel: Revert "PCI: Warn if no host bridge NUMA node info" See: raspberrypi/linux#6531 kernel: drm/v3d: Enable Performance Counters before clearing them See: raspberrypi/linux#6514 kernel: configs: Enable Intel Wireless (PCI) drivers See: raspberrypi/linux#6526 kernel: media: i2c: ov9282: Correct the exposure offset See: raspberrypi/linux#6522 kernel: waveshare panel driver update See: raspberrypi/linux#6499 kernel: dtoverlays: Add Arducam override for ov9281 See: raspberrypi/linux#6506 kernel: nvme-pci: Disable Host Memory Buffer usage See: raspberrypi/linux#6510 kernel: Allow setting I²C clock frequency via i2c_arm_baudrate dtparam when using pimidi overlay See: raspberrypi/linux#6513

